home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4532 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: erich.triumf.ca!bennett
  2. From: bennett@erich.triumf.ca (P.Bennett)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: BEGINNER --> problem with ATEXIT !!!!
  5. Date: 5 Feb 1996 08:00 PST
  6. Organization: TRIUMF: Tri-University Meson Facility
  7. Distribution: world
  8. Message-ID: <5FEB199608000849@erich.triumf.ca>
  9. References: <its.2.000DC6F8@euronet.nl>
  10. NNTP-Posting-Host: erich.triumf.ca
  11. Keywords: ATEXIT
  12. News-Software: VAX/VMS VNEWS 1.50    
  13.  
  14. In article <its.2.000DC6F8@euronet.nl>, its@euronet.nl (it's_b.v.) writes...
  15. >Can somebody help me with the following :
  16. >I use the atexit() function to start a DOS-batchfile when my program ends. 
  17. >The memory which this program uses is freed AFTER the batch-file has 
  18. >completed.   
  19. >the program-code looks like this :
  20. .. code snipped...
  21. >QUESTION :
  22. >Is it possible to free the memory which is used by my program BEFORE the 
  23. >batch-file is executed !
  24.  
  25.  
  26. No.  The batch file is executed _while_ your program exits, not _after_ it
  27. exits.  (That is, somewhere between what you consider the "end" of your
  28. program, and the time that the vendor-supplied startup/cleanup code terminates,
  29. and returns control to the operating system.)
  30.  
  31. I think the only way do do what you want is to run your program, and whatever
  32. is in the other batch file, from one batch file.
  33.  
  34.  
  35. Peter Bennett VE7CEI                | Vessels shall be deemed to be in sight
  36. Internet: bennett@triumf.ca         | of one another only when one can be
  37. Packet: ve7cei@ve7kit.#vanc.bc.ca   | observed visually from the other
  38. TRIUMF, Vancouver, B.C., Canada     |                          ColRegs 3(k)
  39. GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
  40.  
  41.